#include "TcpServer.hpp"
#include <memory>

void Usage(const string& prov)
{
    cerr<<"Usage:"<<prov<<" port";
}

int main(int argc,char *argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(1);
    }
    uint16_t port = stoi(argv[1]);
    unique_ptr<TcpServer> serv = make_unique<TcpServer>(port);

    serv->Init();
    serv->Start();
    return 0;
}